import {defineComponent} from "vue";
import {NButton, NResult} from "naive-ui";

/**
 * 信息展示结果页组件
 */
export default defineComponent({
  name: "InfoResultPage",
  components: { NResult, NButton },
  props: {
    title: {
      type: String,
      default: "信息",
    },
    desc: {
      type: String,
      required: true,
    },
  },
  setup(props) {
    return () => (
      <main class="w-full h-screen flex flex-col justify-center">
        <NResult
          size="huge"
          status="info"
          title={props.title}
          description={props.desc || "在这个年代，信息就是金钱，金钱就是信息。"}
          v-slots={{ footer: () => <NButton>我需要点信息</NButton> }}
        ></NResult>
      </main>
    );
  },
});
